package Map;

import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Test {
    public static void main(String[] args) {

//        HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
        Map<String,String[]> m = Yunnan.m;

        Set Yunnan01 = m.keySet();//获取省份

        for (Object o : Yunnan01){
            System.out.println(o +"\t");
        }
//        System.out.println();

        Scanner scanner = new Scanner(System.in);

//        while 是循环语句
        while (true){
            System.out.println("请输入省份");
            String s =scanner.next();


            if (!m.containsKey(s)){
                System.out.println("输入错误！请重新输入");
            }else {
                System.out.println("你输入的省份" + s );
                 String[]  s1 = (String[])m.get(s);

                 for (String s2 : s1){
                     System.out.println(s2 +"  ");
                 }

                 break;
            }
            }
        }

    }

